package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 商品搜索数据传输对象
 */
@Data
@ApiModel(value = "商品搜索数据传输对象", description = "用于商品搜索的数据传输对象")
public class ProductSearchDTO {

    @ApiModelProperty("关键词")
    private String keyword;

    @ApiModelProperty("分类ID")
    private Long categoryId;

    @ApiModelProperty("商家ID")
    private Long merchantId;

    @ApiModelProperty("最低价格")
    private BigDecimal minPrice;

    @ApiModelProperty("最高价格")
    private BigDecimal maxPrice;

    @ApiModelProperty("商品状态（0-下架，1-上架）")
    private Integer status;

    @ApiModelProperty("审核状态")
    private Integer auditStatus;

    @ApiModelProperty("是否推荐：0-否 1-是")
    private Integer isRecommend;

    @ApiModelProperty("是否新品：0-否 1-是")
    private Integer isNew;

    @ApiModelProperty("是否热销：0-否 1-是")
    private Integer isHot;

    @ApiModelProperty("排序字段")
    private String orderBy;

    @ApiModelProperty("排序方式：asc-升序，desc-降序")
    private String orderType;

    @ApiModelProperty("页码")
    @Min(value = 1, message = "页码不能小于1")
    private Integer pageNum = 1;

    @ApiModelProperty("每页数量")
    @Min(value = 1, message = "每页数量不能小于1")
    private Integer pageSize = 10;
} 